package com.tencreat.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.tencreat.common.core.enums.ImMessageType;
import com.tencreat.common.core.enums.ImSessionType;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("`im_message`")
public class ImMessage implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long sessionId;
    private ImSessionType sessionType;
    private ImMessageType messageType;
    private String content;
    private Long fromUser;
    private String fromAvatar;
    private Long toUser;
    private String toAvatar;
    private Long toGroup;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}